<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="Generator" content="yls">
    <title>信息界面</title>
    <link rel="stylesheet" href="css/site.min.css"/>
    <link rel="stylesheet" href="css/style.css"/>
    <script src="js/jquery-1.11.3.js"></script>
    <script src="js/bootstrap.min.js"></script>
</head>
<body>
<a href='javascript:void(0);'  onclick="logOut()" class='close' style="height:3em; float: right;margin-right: 5%;padding-top: 8px;">退出</a>
<a href="order" type="button" class="close" style="margin-left:5%;float:left;width:8em;height:3em;padding-top: 8px;">订单管理
</a>
<!--信息输入界面-->
<h2 style="text-align: center; color: #ff4d4d;">订单明细</h2>

<div class="container" style="margin-top: 95px;;background-color:#ff4d4d; border-radius:10px;color: #000;">
    <form  action="order/editRemark" method="post">
        <span>基本信息</span>

        <div>
            <table class="table  table-hover">
                <tr>
                    <td>
                        <lable>区&nbsp;&nbsp;&nbsp;&nbsp;域:
                            <select name="" id="">
                                <option value=""><%= areaName %></option>
                            </select></lable>
                    </td>
                    <td>
                        <lable>支付类型:
                            <select name="payway" id="payway">
                                <option><%=payway%></option>
                            </select></lable>
                    </td>
                    <td>
                        <lable>订单金额:
                            <input type="tel" id="total" name="total" value="<%=total%>" required placeholder="请输入订单金额"/></lable>
                    </td>
                </tr>
                <tr>
                    <td>
                        <lable>收货人:
                            <input type="text" id="name" name="name" value="<%=name%>" required placeholder="请输入收货人姓名"/></lable>
                    </td>
                    <td>
                        <lable>联系电话:
                            <input type="tel" id="phone" name="phone" value="<%=phone%>" required placeholder="请输入联系电话"/></lable>
                    </td>
                    <td>
                        <lable>收获地址:
                            <input type="text" id="address" name="address" value="<%=address%>" style="width: 22em;" required placeholder="请输入地址"/></lable>
                    </td>
                </tr>
            </table>
        </div>
        <!--输入信息关键字段-->
        <div class="row">
            <div class="col-md-2 col-xm-2 col-xs-2">
                <!--areaId（区域编号，隐藏）-->
                <!--uid(商家编号，隐藏)-->
            </div>
            <div class="col-md-4 col-xs-4 col-xm-4">
                <!--payway-->
            </div>
            <div class="col-md-6 col-xs-6 col-sm-6">
                <!--total-->
            </div>
        </div>


        <!--输入信息关键字段-->
        <div class="row">
            <div class="col-md-3 col-xs-3 col-sm-3"></div>
            <!--name-->
            <div class="col-md-3 col-xs-3 col-sm-3"></div>
            <!--phone-->
            <div class="col-md-6 col-xs-6 col-sm-6"></div>
            <!--address-->
        </div>
        <span>商品信息</span>

        <div class="input">
            <div>
                <table class="table" style="border-collapse: collapse;margin-left:-15px;">
                    <thead>
                    <tr class="ui-widget-header ">
                        <th style="width:20%;padding-left: 6.5em">商品名:</th>
                        <th style="width: 20%;padding-left: 6.5em">规&nbsp;&nbsp;&nbsp;格:</th>
                        <th style="width: 20%;padding-left: 6.5em">数&nbsp;&nbsp;&nbsp;量:</th>
                        <th style="width: 20%;padding-left: 6.5em">单&nbsp;&nbsp;&nbsp;价:</th>
                        <th style="width: 20%;padding-left: 5em">
                            <!--<img src="images/u58.png" id="addspec" type="button" value="增加一个输入框"-->
                                 <!--style="cursor: pointer;padding-left: 20px" class="insertbutton"/>-->
                        </th>
                    </tr>
                    </thead>
                    <tbody id="tbodyspec">
                    <% for(var i=0;i<goods.length;i++){%>
                    <tr style="height: 1em">
                        <td style="width:20%"><input style="margin-left: 5em" type="text" class="pname" value="<%=goods[i].pname%>"
                                                     placeholder="商品名"/></td>
                        <td style="width:20%"><input style="margin-left: 5em" type="text" class="sname" value="<%=goods[i].sname%>"
                                                     placeholder="规格"/></td>
                        <td style="width:20%"><input style="margin-left: 5em" type="text" class="size" value="<%=goods[i].size%>"
                                                     placeholder="数量"/></td>
                        <td style="width:20%"><input style="margin-left: 5em" type="text" class="price" value="<%=goods[i].price%>"
                                                     placeholder="单价"/></td>
                        <td style="width:20%"></td>
                    </tr>
                    <%}%>
                    </tbody>
                </table>
            </div>
            <div>
                <lable><span style="display: block;">备&nbsp;&nbsp;&nbsp;&nbsp;注:</span>
                    <textarea type="text" name="orderRemark" placeholder="无" style="margin-top: 1%;width:30em;margin-left: 4.5em;height: 5em;"><%=orderRemark%></textarea><br/><br/><input style="margin-left: 100px;" type="submit" value="修改备注"/></lable>
            </div>
        </div>
        <a id="goBack" class="btn btn-primary navbar-right close_1" onclick="history.go(-1)" style="margin-right: 5%;margin-top: 5%;margin-bottom: 1%;height:40px;" type="submit" value="">返回</a>
        <input type="hidden" id="hidOrderid" name="hidOrderid" value="<%=id%>" />
    </form>
</div>
<script>
    $(document).ready(function () {
        $('#addspec').click(function () {
            var html = '<tr><td style="width: 20%"><input style="margin-left: 5em" type="text" class="pname" placeholder="商品名"/></td><td><input type="text"  style="margin-left: 5em" class="sname" placeholder="规格"/></td><td style="width: 20%"><input style="margin-left: 5em" type="text" class="size" placeholder="数量"/></td><td style="width: 20%"><input style="margin-left: 5em" type="text" class="price" placeholder="单价"/></td><td style="width: 20%"><img src="images/u64.png" href="#"  style="margin-left: 6.5em;" class="trdelspec"></td></tr>';
            $('#tbodyspec').append(html);
            $('.trdelspec').bind("click", function () {
                $(this).parent().parent().remove();
            });
        });

        $("#btnSubmit").click(function () {
            var goodsInfo="";
            $("#tbodyspec tr").each(function () {
                var pname = $(".pname", $(this)).val();
                var sname = $(".sname", $(this)).val();
                var size = $(".size", $(this)).val();
                var price = $(".price", $(this)).val();
                goodsInfo += pname + "," + sname + "," + size + "," + price+";";
            })
            if(goodsInfo.length>1){
                goodsInfo=goodsInfo.substring(0,goodsInfo.length-1);
                $("#hidGoods").val(goodsInfo);
            }
        })
    });

    function logOut(){
        top.location.href="../../index/9999";
    }
</script>

<!--<form action="order" method="post">-->
<!--<input name="txtOrderNum" type="text" value=""/>-->
<!--<input name="txtDescription" type="text" value=""/>-->
<!--<input type="submit" value="submit"/>-->
<!--</form>-->
</body>
</html>
